package com.neu.questionnaireplus.dao;

import com.neu.questionnaireplus.entity.GroupToAnswerer;
import java.util.List;
import org.springframework.stereotype.Repository;

@Repository
public interface GroupToAnswererDao {

  /**
  * @Description: 通过群组Id查询AnswererId
  * @Param: [groupId]
  * @return: java.util.List<java.lang.String>
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/3
  */
  List<GroupToAnswerer> queryRelationshipByGroupId(String groupId);


  /**
  * @Description:  通过答者Id查询Id
  * @Param: [answererId]
  * @return: java.util.List<java.lang.String>
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/3
  */
  List<GroupToAnswerer> queryRelationshipByAnswererId(String answererId);

  /**
  * @Description: 双id查询关系
  * @Param: [groupId, answererId]
  * @return: com.neu.questionnaireplus.entity.GroupToAnswerer
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/3
  */
  GroupToAnswerer queryRelation(String groupId,String answererId);


  /**
  * @Description: 通过关系id删除关系
  * @Param: [id]
  * @return: int
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/3
  */
  int deleteRelation(String id);
  
  /** 
  * @Description: 添加群组和答者的关系 
  * @Param: [groupToAnswerer] 
  * @return: int 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/4 
  */ 
  int insertRelation(GroupToAnswerer groupToAnswerer);

}
